﻿#pragma once
#include "ADFGlobal.h"
#include <QVariantList>

// 参数遍历器
class ADF_EXPORT AsParamReader {
public:
	AsParamReader(const QVariantList& list);

private:
	QVariantList m_params;
	unsigned int m_iCursor;

public:
	// 获取下一个值
	template<typename TYPE>
	TYPE next() {
		QVariant nextValue;
		if (m_iCursor < m_params.size()) {
			nextValue = m_params[m_iCursor];
			m_iCursor++;
		}
		return nextValue.value<TYPE>();
	}

};

